﻿using Abp.Domain.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace HCD.Entities
{
    [Table("HCD_MASTER")]
    public class HcdMaster : Entity<long>
    {
        /// <summary>
        /// 病人标识
        /// </summary>
        [Column("PATIENT_ID", TypeName = "VARCHAR(20)")]
        public string PatientId { get; set; }

        /// <summary>
        /// 就诊标识
        /// </summary>
        [Column("VISIT_ID", TypeName = "VARCHAR(20)")]
        public string VisitId { get; set; }

        /// <summary>
        /// 病人姓名
        /// </summary>
        [Column("NAME", TypeName = "VARCHAR(100)")]
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Column("SEX", TypeName = "VARCHAR(4)")]
        public string Sex { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        [Column("DATE_OF_BIRTH", TypeName = "DATETIME")]
        public DateTime DateOfBirth { get; set; }

        /// <summary>
        /// 费别
        /// </summary>
        [Column("CHARGE_TYPE", TypeName = "VARCHAR(8)")]
        public string ChargeType { get; set; }

        /// <summary>
        /// 就诊科室代码
        /// </summary>
        [Column("DEPT_CODE", TypeName = "VARCHAR(20)")]
        public string DeptCode { get; set; }

        /// <summary>
        /// 就诊科室名称
        /// </summary>
        [Column("DEPT_NAME", TypeName = "VARCHAR(40)")]
        public string DeptName { get; set; }

        /// <summary>
        /// 当前床号
        /// </summary>
        [Column("BED_NO", TypeName = "VARCHAR(8)")]
        public string BedNo { get; set; }

        /// <summary>
        /// 当前床标号
        /// </summary>
        [Column("BED_LABEL", TypeName = "VARCHAR(8)")]
        public string BedLabel { get; set; }

        /// <summary>
        /// 主要诊断
        /// </summary>
        [Column("DIAGNOSIS", TypeName = "VARCHAR(500)")]
        public string Diagnosis { get; set; }

        /// <summary>
        /// 病情状态
        /// </summary>
        [Column("PATIENT_CONDITION", TypeName = "VARCHAR(20)")]
        public string PatientCondition { get; set; }

        /// <summary>
        /// 就诊状态
        /// </summary>
        [Column("VISIT_STATUS", TypeName = "VARCHAR(10)")]
        public string VisitStatus { get; set; }

        /// <summary>
        /// 出院/转出方式
        /// </summary>
        [Column("DISCHARGE_TYPE", TypeName = "VARCHAR(20)")]
        public string DischargeType { get; set; }

        /// <summary>
        /// 管床/接诊医生id
        /// </summary>
        [Column("DOCTOR_IN_CHARGE", TypeName = "VARCHAR(20)")]
        public string DoctorInCharge { get; set; }

        /// <summary>
        /// 就诊日期及时间
        /// </summary>
        [Column("ADMISSION_DATE_TIME", TypeName = "DATETIME")]
        public DateTime AdmissionDateTime { get; set; }

        /// <summary>
        /// 结束就诊日期及时间
        /// </summary>
        [Column("DISCHARGE_DATE_TIME", TypeName = "DATETIME")]
        public DateTime? DischargeDateTime { get; set; }

        /// <summary>
        /// 家庭地址
        /// </summary>
        [Column("MAILING_ADDRESS", TypeName = "VARCHAR(100)")]
        public string MailingAddress { get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        [Column("PHONE_NUMBER", TypeName = "VARCHAR(16)")]
        public string PhoneNumber { get; set; }

        /// <summary>
        /// 随访状态
        /// </summary>
        [Column("FOLLOW_UP_STATUS", TypeName = "VARCHAR(5)")]
        public string FollowUpStatus { get; set; }

        /// <summary>
        /// 随访管理组
        /// </summary>
        [Column("FOLLOW_UP_GROUP", TypeName = "VARCHAR(20)")]
        public string FollowUpGroup { get; set; }

        /// <summary>
        /// 随访操作者
        /// </summary>
        [Column("FOLLOW_UP_OPERATOR", TypeName = "VARCHAR(20)")]
        public string FollowUpOperator { get; set; }

        /// <summary>
        /// 进入随访管理操作时间
        /// </summary>
        [Column("FOLLOW_UP_DATE_TIME", TypeName = "DATETIME")]
        public DateTime? FollowUpDateTime { get; set; }

        /// <summary>
        /// 移除院内管理标志（1：移除管理）
        /// </summary>
        [Column("REMOVE_MANAGEMENT", TypeName = "VARCHAR(1)")]
        public string RemoveManagement { get; set; }

        /// <summary>
        /// 移除管理操作人
        /// </summary>
        [Column("REMOVE_OPERATOR", TypeName = "VARCHAR(20)")]
        public string RemoveOperator { get; set; }

        /// <summary>
        /// 移除管理操作时间
        /// </summary>
        [Column("REMOVE_DATE_TIME", TypeName = "DATETIME")]
        public DateTime? RemoveDateTime { get; set; }

        /// <summary>
        /// 医院代码
        /// </summary>
        [Column("HOSPITAL_CODE", TypeName = "VARCHAR(20)")]
        public string HospitalCode { get; set; }

        /// <summary>
        /// 管理分型代码
        /// </summary>
        [Column("PARTING_CODE", TypeName = "VARCHAR(20)")]
        public string PartingCode { get; set; }

        /// <summary>
        /// 管理分型名称
        /// </summary>
        [Column("PARTING_NAME", TypeName = "VARCHAR(20)")]
        public string PartingName { get; set; }
        
        /// <summary>
        /// 糖尿病类型
        /// </summary>
        [Column("DIABETES_TYPE", TypeName = "VARCHAR(10)")]
        public string DiabetesType { get; set; }
        
        /// <summary>
        /// 风险等级
        /// </summary>
        [Column("RISK_LEVEL", TypeName = "VARCHAR(10)")]
        public string RiskLevel { get; set; }
    }
}
